﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
using Webapi.EFCore.Model;

namespace Webapi.EFCore.IService.Base
{
    /// <summary>
    /// 服务基接口
    /// </summary>
    /// <typeparam name="TEntity"></typeparam>
    public interface IBaseService<TEntity> where TEntity : class
    {
        /// <summary>
        /// 添加实体
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        Task<MessageModel<CurdModel>> Add(TEntity model);


        /// <summary>
        /// 获取所有
        /// </summary>
        /// <returns></returns>
        Task<List<TEntity>> GetList();


        /// <summary>
        /// 测试添加
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        Task<int> Addint(TEntity model);
    }
}
